package com.example.myapplication.ui.movie

import android.content.Context
import android.util.Log
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter


class movieAdapter (val tabs_title:ArrayList<String>, val tabs_fragment:ArrayList<Fragment>,
                    fm:FragmentManager): FragmentPagerAdapter(fm){

    override fun getItem(position: Int): Fragment {
        Log.d("", "${position}")

        return tabs_fragment.get(position)
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return tabs_title.get(position)
    }

    override fun getCount(): Int {
       return tabs_fragment.size
    }
}